﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true"
    CodeFile="Teachers-List.aspx.cs" Inherits="Teacher_Teacher_list" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <title>Teacher Listing</title>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="bodyContentTop" runat="Server">
    <h1>
        Teacher</h1>
    <h3>
        How many Teachers have in selected school?.</h3>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="bodyContent" runat="Server">
    <div class="elements_inner_wrapper">
        <div id="contentBody">
            <div class="section">
                <div class="seperator">
                </div>
                <fieldset class="formouter">
                    <table cellpadding="3" cellspacing="3" width="100%">
                        <tr>
                            <td colspan="2">
                                <div class="row_curved" id="divSchoolList" runat="server" title="Example:UCSM, MIT, YTU">
                                    <label for="<%=ddlSchoolList.ClientID%>" class="mand_red">
                                        <asp:Label runat="server" Text="Selected School Name" ID="Label2" /></label>
                                    <div class="field">
                                        <span class="indicator">
                                            <asp:DropDownList AutoPostBack="True" runat="server" ID="ddlSchoolList" OnSelectedIndexChanged="ddlSchoolList_SelectedIndexChanged"
                                                DataTextField="ListText" DataValueField="ListValue" />
                                            <asp:RequiredFieldValidator ID="rfvSchoolList" ValidationGroup="StudentProfile" ControlToValidate="ddlSchoolList"
                                                runat="server" CssClass="validationErrorControl" Display="Dynamic" ErrorMessage="<br/>Please select a school name.<br/>"></asp:RequiredFieldValidator>
                                            <br />
                                        </span>
                                    </div>
                                    <div class="clear">
                                    </div>
                                </div>
                                <div class="row_curved" id="divFirst" runat="server">
                                    <label for="<%=txtName.ClientID%>" class="mand_red">
                                        <asp:Label runat="server" Text="Name" ID="lblFirstName" Width="140px" /></label>
                                    <span class="indicator">
                                        <asp:TextBox Width="270px" ID="txtName" MaxLength="50" runat="server" />
                                    </span>
                                    <div class="clear">
                                    </div>
                                </div>
                                <div class="row_curved" id="divFirstName" runat="server">
                                    <label for="<%=txtNRIC.ClientID%>" class="mand_red">
                                        <asp:Label runat="server" Text="NRIC No" ID="Label3" Width="140px" /></label>
                                    <span class="indicator">
                                        <asp:TextBox Width="270px" ID="txtNRIC" MaxLength="50" runat="server" />
                                    </span>
                                    <div class="clear">
                                    </div>
                                </div>
                                <div class="row_curved" id="div1" runat="server">
                                    <label for="<%=txtAddress.ClientID%>" class="mand_red">
                                        <asp:Label runat="server" Text="Address" ID="Label1" Width="140px" /></label>
                                    <span class="indicator">
                                        <asp:TextBox Width="270px" ID="txtAddress" MaxLength="50" runat="server" />
                                    </span>
                                    <div class="clear">
                                    </div>
                                </div>
                                <asp:UpdatePanel runat="server" ID="uplCountry">
                                    <ContentTemplate>
                                        <div class="row_curved" id="divCountry" runat="server">
                                            <label for="<%=ddlCountry.ClientID%>" class="mand_red">
                                                <asp:Label runat="server" Text="Country" ID="lblCountry" Width="120px" /></label>
                                            <span class="indicator">
                                                <asp:DropDownList Width="100px" AutoPostBack="true" runat="server" ID="ddlCountry"
                                                    OnSelectedIndexChanged="ddlCountry_SelectedIndexChanged">
                                                </asp:DropDownList>
                                            </span>
                                            <div class="clear">
                                            </div>
                                        </div>
                                        <div class="row_curved" id="divDisctrict" runat="server">
                                            <label for="<%=ddlDistrict.ClientID%>" class="mand_red">
                                                <asp:Label runat="server" Text="Province" ID="lblDistrict" /></label>
                                            <span class="indicator">
                                                <asp:DropDownList Width="100px" AutoPostBack="true" runat="server" ID="ddlDistrict"
                                                    OnSelectedIndexChanged="ddlDistrict_SelectedIndexChanged">
                                                </asp:DropDownList>
                                            </span>
                                            <label for="<%=ddlCity.ClientID%>" style="width: 80px;" class="mand_red">
                                                <asp:Label runat="server" Text="City Name" ID="lblCity" /></label>
                                            <asp:DropDownList Width="100px" runat="server" ID="ddlCity">
                                            </asp:DropDownList>
                                            <div class="clear">
                                            </div>
                                        </div>
                                    </ContentTemplate>
                                </asp:UpdatePanel>
                                <div class="row_curved" id="div2" runat="server">
                                    <label for="<%=txtNRIC.ClientID%>" class="mand_red">
                                        <asp:Label runat="server" Text="Address Type" ID="Label4" Width="140px" /></label>
                                    <span class="indicator">
                                        <asp:DropDownList ID="ddlAddressType" runat="server" CssClass="inputbox_medium">
                                            <asp:ListItem Text="Permanent Address" Value="1"></asp:ListItem>
                                            <asp:ListItem Text="Mailing Address" Value="2" />
                                        </asp:DropDownList>
                                    </span>
                                    <div class="clear">
                                    </div>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <br />
                                <asp:Button Visible="true" runat="server" ID="btnShowTeacherProfiles" Text="Search"
                                    OnClick="btnShowTeacherProfiles_Click" />
                                &nbsp;&nbsp;
                                <asp:Button runat="server" ID="btnAddNewTeacher" Text="Add New Teacher" OnClick="btnAddNewTeacher_Click" />
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2">
                                <h2>
                                    Teacher Listing</h2>
                                <asp:GridView ID="grvTeacherProfile" runat="server" AutoGenerateColumns="False" DataKeyNames="TeacherProfileKey"
                                    CellPadding="4" ForeColor="#333333" Width="100%" OnRowDeleting="grvTeacherProfile_RowDeleting"
                                    GridLines="None" OnSelectedIndexChanged="grvTeacherProfile_SelectedIndexChanged">
                                    <RowStyle BackColor="#EFF3FB" />
                                    <Columns>
                                        <asp:BoundField DataField="TeacherProfileKey" HeaderText="TeacherProfileKey" InsertVisible="False"
                                            ReadOnly="True" SortExpression="TeacherProfileKey" Visible="False" />
                                        <asp:BoundField DataField="UserAccountKey" HeaderText="ID" SortExpression="UserAccountKey"
                                            HeaderStyle-Width="5%" />
                                        <asp:BoundField DataField="FirstName" HeaderText="FirstName" SortExpression="FirstName"
                                            HeaderStyle-Width="15%" />
                                        <asp:BoundField DataField="LastName" HeaderText="SurName" SortExpression="LastName"
                                            HeaderStyle-Width="15%" />
                                        <asp:BoundField DataField="OtherName" HeaderText="OtherName" SortExpression="OtherName"
                                            HeaderStyle-Width="15%" />
                                        <asp:BoundField DataField="CreatedDateTime" HeaderText="CreatedDateTime" SortExpression="CreatedDateTime"
                                            HeaderStyle-Width="20%" Visible="False" />
                                        <asp:BoundField DataField="ModifiedDateTime" HeaderText="ModifiedDateTime" ReadOnly="True"
                                            HeaderStyle-Width="20%" SortExpression="ModifiedDateTime" />
                                        <%--<asp:TemplateField>
                                            <HeaderStyle Width="10%"></HeaderStyle>
                                            <ItemTemplate>
                                                <asp:HyperLink ID="hnkBudgetRate" runat="server" Text='Edit Detail' NavigateUrl='<%#"TeacherEntry.aspx?UserAccountKey="+ DataBinder.Eval(Container.DataItem,"UserAccountKey")+"&SchoolKey=" +DataBinder.Eval(Container.DataItem,"SchoolKey")%>'>
                                                </asp:HyperLink>
                                            </ItemTemplate>
                                        </asp:TemplateField>--%>
                                        <asp:HyperLinkField Text="Edit Details" DataNavigateUrlFormatString="~/teacher/teacherentry.aspx?id={0}"
                                            DataNavigateUrlFields="UserAccountKey" Visible="true" />
                                        <asp:CommandField ShowDeleteButton="True" ButtonType="Link" />
                                    </Columns>
                                    <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                                    <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                                    <EmptyDataTemplate>
                                        Please Add New Teacher of Selected School.
                                    </EmptyDataTemplate>
                                    <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                                    <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                                    <EditRowStyle BackColor="#2461BF" />
                                    <AlternatingRowStyle BackColor="White" />
                                </asp:GridView>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2">
                                <div runat="server" id="divSelectedKeys" visible="false">
                                    <asp:Label runat="server" ID="lblSelectedTeacherProfileKey" />
                                    <asp:Label runat="server" ID="lblSelectedTeacherUserAccountKey" />
                                </div>
                            </td>
                        </tr>
                    </table>
                </fieldset>
            </div>
        </div>
    </div>
</asp:Content>
